package com.sann.config;

import com.sann.entity.Car;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
@ComponentScan("com.sann")// 开启注解扫描
public class MainConfig {

    @Bean(initMethod = "init", destroyMethod = "destroy")
//    @Scope("prototype")
    public Car car(){
        return new Car();
    }
}
